package com.lingyu.jsjx.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lingyu.jsjx.mapper.ParentEvaluationMapper;
import com.lingyu.jsjx.domain.ParentEvaluation;
import com.lingyu.jsjx.service.IParentEvaluationService;

/**
 * 家长评价Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-08
 */
@Service
public class ParentEvaluationServiceImpl  extends ServiceImpl<ParentEvaluationMapper, ParentEvaluation> implements IParentEvaluationService
{
    @Autowired
    private ParentEvaluationMapper parentEvaluationMapper;

    /**
     * 查询家长评价
     * 
     * @param parentEvalId 家长评价主键
     * @return 家长评价
     */
    @Override
    public ParentEvaluation selectParentEvaluationByParentEvalId(Long parentEvalId)
    {
        return parentEvaluationMapper.selectParentEvaluationByParentEvalId(parentEvalId);
    }

    /**
     * 查询家长评价列表
     * 
     * @param parentEvaluation 家长评价
     * @return 家长评价
     */
    @Override
    public List<ParentEvaluation> selectParentEvaluationList(ParentEvaluation parentEvaluation)
    {
        return parentEvaluationMapper.selectParentEvaluationList(parentEvaluation);
    }

    /**
     * 新增家长评价
     * 
     * @param parentEvaluation 家长评价
     * @return 结果
     */
    @Override
    public int insertParentEvaluation(ParentEvaluation parentEvaluation)
    {
        return baseMapper.insert(parentEvaluation);
    }

    /**
     * 修改家长评价
     * 
     * @param parentEvaluation 家长评价
     * @return 结果
     */
    @Override
    public int updateParentEvaluation(ParentEvaluation parentEvaluation)
    {

        return baseMapper.updateById(parentEvaluation);
    }

    /**
     * 批量删除家长评价
     * 
     * @param parentEvalIds 需要删除的家长评价主键
     * @return 结果
     */
    @Override
    public int deleteParentEvaluationByParentEvalIds(Long[] parentEvalIds)
    {
        return parentEvaluationMapper.deleteParentEvaluationByParentEvalIds(parentEvalIds);
    }

    /**
     * 删除家长评价信息
     * 
     * @param parentEvalId 家长评价主键
     * @return 结果
     */
    @Override
    public int deleteParentEvaluationByParentEvalId(Long parentEvalId)
    {
        return baseMapper.deleteById(parentEvalId);
    }
}
